{% extends "base.html" %}

{% block title %}mobeir{% endblock %}
{% block head %}
<link href="/medias/css/device.css" rel="stylesheet" type="text/css"/>
<link href="/medias/css/app.css" rel="stylesheet" type="text/css"/>

{% endblock %}


{% block left_content %}

<div id="devicelist">
	<h3><span class="sLeft">最受关注的手机终端</span><span class="sRight"><a href="/device/">...查看更多</a></span></h3>
	{% for device in devices %}
	<div class="imgPro">
		<div class="imga"><a href="/device/detail/{{device.id}}" ><img alt="{{device.name}}"  src="{{device.image.url_125x125|default:"image/default.jpg"}}"/></a></div>
		<div class="title">{{device.name}}</div>	
	</div>
	{% endfor %}	
</div>

<div id="applist">
	<h3><span class="sLeft">最受关注的应用</span><span class="sRight"><a href="/app/">...查看更多</a></span></h3>
	{% for app in apps %}
	<div class="imgPro">
		<div class="imga"><a href="/app/detail/{{app.id}}" ><img alt="{{app.name}}"  src="{{app.image.url_125x125|default:"image/default.jpg"}}"/></a></div>
		<div class="title">{{app.name}}</div>	
	</div>
	{% endfor %}		
</div>

<div id="midLeft">
<h3><span class="sLeft">活跃圈子</span><span class="sRight"></span></h3>
	
{% for group in groups %}
<div class="sub-item">
	<div class="pic">
		<a href="/group/{{group.id}}"><img  width=50 height=50 alt="{{group.name}}" src="/medias/{{group.image}}"></a>
	</div>
	<div class="info">
		<a href="/group/{{group.id}}">{{group.name}}</a> (30539)<br/>{{group.summary|slice:":40"}}...
	</div>
</div>
{% endfor %}		

</div>

{% endblock %}

{% block right_content %}

{% if not request.user.is_authenticated %}
<div id="right_button" class="corner"><a href="/register/">创建新帐号</a></div></br>
{% endif %}

<h3><span class="sLeft">活跃用户</span><span class="sRight"></span></h3>


<div id="sub-persion">
{% for auser in act_users %}
<ul>
	<li><a href="#"><img alt="{{auser.user.username}}" src="/medias/{{auser.image|default:"images/default_uimg.png"}}" width=46 height=46 /></a></li>
	<li><a href="#">{{auser.user.username}}</a></li>
</ul>	
{% endfor %}
</div>


<div id="hotCont">
	<h3><span class="sLeft">活跃主题</span><span class="sRight"></span></h3>
	<ul>
		{% for topic in topics %}	
		<li><font color="#b9cedb">●</font><a target="_blank" href="/topic/{{topic.id}}/">{{topic.title|slice:":22"|escape}}</a>...   评论：{{topic.replies_count}}</li>
	    {% endfor %}
	</ul>	
		
</div>

<h3><span class="sLeft">热门标签</span><span class="sRight"></span></h3>
<div class="hot_tag">
	<ul>
	{% for tag in tags %}
    <li><a href="/tag/{{tag.name}}">{{tag.name}}</a></li>
	{% endfor %}
	</ul>
</div>

		
{% endblock %}